<?php

require_once './include/common.inc.php';

$page_title = 'jans2en furniture - Distribution - Distribution';
$menu_id = 11;

$sql = "SELECT * FROM `distribution` ORDER BY `country` ASC, `seq` ASC";
$query = $db->query($sql);
while($rs = $db->fetch_array($query)) {
    $out_ary[$rs['area']][] = $rs;
}

ksort($out_ary);
$s = '';
foreach ($out_ary as $k=>$v) {
    $s .= '<tr><td valign="top" colspan=2><strong>' . $AREA_ARY[$k]['name'] . '</strong></td><tr>';
    foreach ($v as $v1) {
        $s .= '<tr><td valign="top" width="40%">' . $v1['country'] . '</td><td valign="top" >' . $v1['type'] . '</td><tr>';
    }
    $s .= '<tr height=10><td colspan=2><p>&nbsp;</p></td></tr>';
}

// -------------- guideͼƬ start ----------------------------------------
$system_ary = getSystemValue("");
$guide_pic = $system_ary['picture_distributions'];
if (trim($guide_pic) == "" || !file_exists("./attachments/system/" . $guide_pic)) {
    $guide_pic = './attachments/system/no_guide.gif';
} else {
    $guide_pic = './attachments/system/' . $guide_pic;
}
// -------------- guideͼƬ end ------------------------------------------

	browseTracking(10,0,'Home > Distribution');
require_once PrintEot('header');
require_once PrintEot('distribution');
require_once PrintEot('footer');

?>